"""
可变参数
"""


def sum_nums(*args):
    rst = 0
    for i in args:
        rst += i
    return rst


def sum_nums1(name, *args):
    print(name)
    rst = 0
    for i in args:
        rst += i
    return rst


# print(sum_nums(1, 2, 3, 4, 5))
print(sum_nums1('hello', 1, 2, 3, 4, 5))


def key_word_args(**kwargs):
    print(kwargs)
    print(kwargs['name'])
    print(kwargs['age'])


key_word_args(name='hello', age=18)
